<template>
  <div class="v-container">
    <v-header title="支付成功">
    </v-header>
    <div class="v-main">
      <div class="xcBox">
        <div class="xcContent">
          <div id="qrcodeCanvas" class="xccode">
            <!-- <vue-qr :logoSrc="imageUrl02" :text="codeValue" :margin="0" :size="120"></vue-qr> -->
            <qrcode-vue :size="size" :value="value" :logo="logo" :bgColor="bgColor" :fgColor="fgColor"></qrcode-vue>
          </div>
          <div class="xctext">
            <table>
              <tbody>
                <tr>
                  <td width="76"><span class="xctext-title">订单串码：</span></td>
                  <td><span>{{orderId}}</span></td>
                </tr>
                <tr>
                  <td width="76"><span class="xctext-title">有效期至：</span></td>
                  <td><span>{{endTime}}</span></td>
                </tr>
                <!-- <tr>
                                <td colspan="2" class="orange">*洗车券自支付成功后30日内有效，过期无效，请尽快使用，过期不支持退款</td>
                            </tr> -->
              </tbody>
            </table>
            <!-- <div class="tips orange">*洗车券有效期至购买起30天有效，过期无效，请尽快使用，过期不支持退款</div> -->
          </div>
          <mt-button class="my-button hot-button round" @click="pageTo('city')">查看服务网点</mt-button>
          <mt-button class="my-button hot-button round" @click="pageTo('mainpage')">返回首页</mt-button>
        </div>
      </div>
      <div class="xcsm"><img src="@/assets/images/sysm.png" width="100%" alt="使用说明"></div>
    </div>
  </div>
</template>

<script>
import vHeader from '@/components/Header.vue';
import { Resource } from '@/services/resource';
import LocalStorage from '@/services/storage';
import qrcodeVue from 'qrcode-vue';
import imgSuncar from '@/assets/images/suncar.png';
const proxy = require('@/env/proxy');
const locaHref = proxy.locaHref;


export default {
  name: 'result',
  components: {
    vHeader,
    qrcodeVue
  },
  props: {
    title: {
      type: String,
      default: '标题'
    }
  },
  data() {
    return {
      size: 60,
      bgColor: '#fff',
      fgColor: '#000',
      value: '1231',
      logo: imgSuncar,
      orderId:'',
      endTime:''
    };
  },
  mounted() {
    this.value=sessionStorage.matrixContent;
    this.orderId=sessionStorage.orderId;
    this.endTime=sessionStorage.endTime;
  },
  methods: {
    
    // 跳转页面
    pageTo(name) {
      console.log(name);
      if(name=='mainpage'){
        window.location.href =locaHref
      }else{
        this.$router.replace(name);
      }
    }
  }
};
</script>

<style lang="less" scoped>
@import url('./result.less');
</style>


